package com.beyondbit.demo.service;

import com.beyondbit.demo.entity.CommonAttachment;

import java.util.List;

public interface CommonAttachmentService {
    /**
     * 新增
     *
     * @param attachment
     * @return
     */
    int insert(CommonAttachment attachment);

    /**
     * 删除
     *
     * @param attachmentId
     * @return
     */
    int deleteById(String attachmentId);

    /**
     * 查询
     *
     * @param attachmentId
     * @return
     */
    CommonAttachment getById(String attachmentId);

    /**
     * 查询附件
     *
     * @param query
     * @return
     */
    List<CommonAttachment> query(CommonAttachment query);


    CommonAttachment queryMainAttachment(String commonID);
}
